/**
 * 搜索reducer
 * created by xq on 2018/10/16
 */

// 搜索state初始值
const initState = ''
/**
 * searchReducer
 * @param {Object} state state状态 
 * @param {Object} action 
 */
export default function search (state = initState, action) {
  switch(action.type) {
    case 'CHANGE_SEARCH':
      return action.searchText
    default:
      return state
  }
}